package com.yc.bran.snack.bean;

import java.util.Date;
import java.util.List;
import java.util.Objects;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;


public class OrderInfo {
	private Integer oid;
	private String ono;
	private Integer uid;
	private Date odate;
	private String uname;;
	private String utel;
	private String addre;
	private String detailed;
	private Integer status;
	private Double totalprice;
	
	@Override
	public String toString() {
		return "OrderInfo [oid=" + oid + ", ono=" + ono + ", uid=" + uid + ", odate=" + odate + ", uname=" + uname
				+ ", utel=" + utel + ", addre=" + addre + ", detailed=" + detailed + ", status=" + status
				+ ", totalprice=" + totalprice + "]";
	}
	
	public Integer getOid() {
		return oid;
	}

	public void setOid(Integer oid) {
		this.oid = oid;
	}

	public String getOno() {
		return ono;
	}

	public void setOno(String ono) {
		this.ono = ono;
	}

	public Integer getUid() {
		return uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	public Date getOdate() {
		return odate;
	}

	public void setOdate(Date odate) {
		this.odate = odate;
	}

	public String getUname() {
		return uname;
	}

	public void setUname(String uname) {
		this.uname = uname;
	}

	public String getUtel() {
		return utel;
	}

	public void setUtel(String utel) {
		this.utel = utel;
	}

	public String getAddre() {
		return addre;
	}

	public void setAddre(String addre) {
		this.addre = addre;
	}

	public String getDetailed() {
		return detailed;
	}

	public void setDetailed(String detailed) {
		this.detailed = detailed;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Double getTotalprice() {
		return totalprice;
	}

	public void setTotalprice(Double totalprice) {
		this.totalprice = totalprice;
	}

	@Override
	public int hashCode() {
		return Objects.hash(addre, detailed, odate, ono, status, totalprice, uid, uname, utel);
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		OrderInfo other = (OrderInfo) obj;
		return Objects.equals(addre, other.addre) && Objects.equals(detailed, other.detailed)
				&& Objects.equals(odate, other.odate) && Objects.equals(ono, other.ono)
				&& Objects.equals(status, other.status) && Objects.equals(totalprice, other.totalprice)
				&& Objects.equals(uid, other.uid) && Objects.equals(uname, other.uname)
				&& Objects.equals(utel, other.utel);
	}
}